3.258 \(\int \frac {1}{-c-d+(c-d) x^2} \, dx\)

Optimal. Leaf size=37 \[ -\frac {\tanh ^{-1}\left (\frac {x \sqrt {c-d}}{\sqrt {c+d}}\right )}{\sqrt {c-d} \sqrt {c+d}} \]

[Out]

-arctanh(x*(c-d)^(1/2)/(c+d)^(1/2))/(c-d)^(1/2)/(c+d)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {208} \[ -\frac {\tanh ^{-1}\left (\frac {x \sqrt {c-d}}{\sqrt {c+d}}\right )}{\sqrt {c-d} \sqrt {c+d}} \]

Antiderivative was successfully verified.

[In]

Int[(-c - d + (c - d)*x^2)^(-1),x]

[Out]

-(ArcTanh[(Sqrt[c - d]*x)/Sqrt[c + d]]/(Sqrt[c - d]*Sqrt[c + d]))

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin {align*} \int \frac {1}{-c-d+(c-d) x^2} \, dx &=-\frac {\tanh ^{-1}\left (\frac {\sqrt {c-d} x}{\sqrt {c+d}}\right )}{\sqrt {c-d} \sqrt {c+d}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 44, normalized size = 1.19 \[ \frac {\tan ^{-1}\left (\frac {x \sqrt {c-d}}{\sqrt {-c-d}}\right )}{\sqrt {-c-d} \sqrt {c-d}} \]

Antiderivative was successfully verified.

[In]

Integrate[(-c - d + (c - d)*x^2)^(-1),x]

[Out]

ArcTan[(Sqrt[c - d]*x)/Sqrt[-c - d]]/(Sqrt[-c - d]*Sqrt[c - d])

________________________________________________________________________________________

fricas [A]  time = 0.94, size = 102, normalized size = 2.76 \[ \left [\frac {\log \left (\frac {{\left (c - d\right )} x^{2} - 2 \, \sqrt {c^{2} - d^{2}} x + c + d}{{\left (c - d\right )} x^{2} - c - d}\right )}{2 \, \sqrt {c^{2} - d^{2}}}, \frac {\sqrt {-c^{2} + d^{2}} \arctan \left (\frac {\sqrt {-c^{2} + d^{2}} x}{c + d}\right )}{c^{2} - d^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-c-d+(c-d)*x^2),x, algorithm="fricas")

[Out]

[1/2*log(((c - d)*x^2 - 2*sqrt(c^2 - d^2)*x + c + d)/((c - d)*x^2 - c - d))/sqrt(c^2 - d^2), sqrt(-c^2 + d^2)*
arctan(sqrt(-c^2 + d^2)*x/(c + d))/(c^2 - d^2)]

________________________________________________________________________________________

giac [A]  time = 0.59, size = 33, normalized size = 0.89 \[ \frac {\arctan \left (\frac {c x - d x}{\sqrt {-c^{2} + d^{2}}}\right )}{\sqrt {-c^{2} + d^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-c-d+(c-d)*x^2),x, algorithm="giac")

[Out]

arctan((c*x - d*x)/sqrt(-c^2 + d^2))/sqrt(-c^2 + d^2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 33, normalized size = 0.89 \[ -\frac {\arctanh \left (\frac {\left (c -d \right ) x}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-c-d+(c-d)*x^2),x)

[Out]

-1/((c+d)*(c-d))^(1/2)*arctanh((c-d)*x/((c+d)*(c-d))^(1/2))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-c-d+(c-d)*x^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*c^2-4*d^2>0)', see `assume?`
 for more details)Is 4*c^2-4*d^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.29, size = 29, normalized size = 0.78 \[ -\frac {\mathrm {atanh}\left (\frac {x\,\sqrt {c-d}}{\sqrt {c+d}}\right )}{\sqrt {c+d}\,\sqrt {c-d}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(c + d - x^2*(c - d)),x)

[Out]

-atanh((x*(c - d)^(1/2))/(c + d)^(1/2))/((c + d)^(1/2)*(c - d)^(1/2))

________________________________________________________________________________________

sympy [B]  time = 0.23, size = 87, normalized size = 2.35 \[ \frac {\sqrt {\frac {1}{\left (c - d\right ) \left (c + d\right )}} \log {\left (- c \sqrt {\frac {1}{\left (c - d\right ) \left (c + d\right )}} - d \sqrt {\frac {1}{\left (c - d\right ) \left (c + d\right )}} + x \right )}}{2} - \frac {\sqrt {\frac {1}{\left (c - d\right ) \left (c + d\right )}} \log {\left (c \sqrt {\frac {1}{\left (c - d\right ) \left (c + d\right )}} + d \sqrt {\frac {1}{\left (c - d\right ) \left (c + d\right )}} + x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-c-d+(c-d)*x**2),x)

[Out]

sqrt(1/((c - d)*(c + d)))*log(-c*sqrt(1/((c - d)*(c + d))) - d*sqrt(1/((c - d)*(c + d))) + x)/2 - sqrt(1/((c -
 d)*(c + d)))*log(c*sqrt(1/((c - d)*(c + d))) + d*sqrt(1/((c - d)*(c + d))) + x)/2

________________________________________________________________________________________